package com.hspedu;

/**
 * @author DL5O
 * @version 1.0
 */
public class CPUNumbers {
    public static void main(String[] args) {
        Runtime runtime = Runtime.getRuntime();
        //获取当前电脑的CPU数量
        int cpuNums = runtime.availableProcessors();
        System.out.println("当前有核心个数=" + cpuNums);

    }
}
